<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>生成器执行过程</title>
</head>
<body>
<script>
    function* NinjaGenerator(action) {
        yield 'Hottori '+ action;
        return 'Yoshi' + action;
    }

    const ninjaIterator = NinjaGenerator('skulk');
    const result = ninjaIterator.next();
    const result2 = ninjaIterator.next();
</script>
</body>
</html>
